# import numpy as np
# import datetime

# idx = np.random.randint(0, 20, 5)
# print(idx)

# a = np.array([[1,2,3],[4,5,6]])
# a_ = np.array([[7,8,9],[10,11,12]])
# b = np.c_[a, a_]
# c = np.r_[a, a_]
# print(a)
# print("column:\n", b)
# print("row:\n", c)

# # strftime输出str
# a = datetime.datetime.now().strftime('%Y-%m-%d_%H-%M')
# print(a)
# print(type(a))

#############################################################
# import argparse      # 命令行参数解析包
# import yaml          # yaml文件解析包

# parser = argparse.ArgumentParser()            # 创建对象
# parser.add_argument('--config', default='config.yaml', type=str)   # 添加参数
# args = parser.parse_args()  # 解析添加的参数

# with open(args.config) as f:
#     config = yaml.load(f)
# print("**************************")
# for k, v in config['common'].items():
#     setattr(args, k, v)
#     print('[%s]:' % (k), v)
# print("**************************")

# batch_size = args.batch_size   # 通过这种方式获取参数

##############################################################

# import pdb

# s = '0'
# n = int(s)
# pdb.set_trace()
# print(10/n)


"""ref: https://zhuanlan.zhihu.com/p/32025746
"""

# 1. 安装： pip install visdom
# 2. 启动：python -m visdom.server

# 3. python test.py
from visdom import Visdom
import matplotlib.pyplot as plt

viz = Visdom()
assert viz.check_connection()



plt.plot([1, 25, 2, 4])
plt.ylabel('some numbers')
viz.matplot(plt)
